package com.fly.demo.web;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import reactor.core.publisher.Mono;

/**
 * 
 * Spring WebFlux快速上手——响应式Spring的道法术器 https://blog.csdn.net/get_set/article/details/79480233
 */
@RestController
public class IndexController
{
    @GetMapping("/")
    public Mono<String> index()
    {
        // 使用Mono.just生成响应式数据
        return Mono.just("Welcome to reactive world ~");
    }
}
